import request from '@/utils/request'

// 查询报名项目列表
export function listGrant(query) {
  return request({
    url: '/grant/grant/list',
    method: 'get',
    params: query
  })
}

// 查询报名项目详细
export function getGrant(grantId) {
  return request({
    url: '/grant/grant/' + grantId,
    method: 'get'
  })
}

// 新增报名项目
export function addGrant(data) {
  return request({
    url: '/grant/grant',
    method: 'post',
    data: data
  })
}

// 修改报名项目
export function updateGrant(data) {
  return request({
    url: '/grant/grant',
    method: 'put',
    data: data
  })
}

// 删除报名项目
export function delGrant(grantId) {
  return request({
    url: '/grant/grant/' + grantId,
    method: 'delete'
  })
}

// 导出报名项目
export function exportGrant(query) {
  return request({
    url: '/grant/grant/export',
    method: 'get',
    params: query
  })
}
// 不分页全量查询
export function listGrantAll(query) {
  return request({
    url: '/grant/grant/listAll',
    method: 'get',
    params: query
  })
}
